﻿using Microsoft.SharePoint.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Albatross.SharePoint.Explorer.ViewModels {
	public class FieldLinkViewModel : ClientObjectViewModel {
		public FieldLinkViewModel(ClientContext context, string name, FieldLink fieldLink) : base(context, name, fieldLink) { }
		public FieldLink FieldLink { get { return (FieldLink)ClientObject; } }
		public override string GetTreeItemTitle() {
			if (Name == string.Empty) {
				return FieldLink.Name;
			} else {
				return Name;
			}
		}
		public override string GetContentTitle() {
			return FieldLink.Name;
		}
	}
}
